package com.alibaba.goods.order.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.goods.order.entity.Commentresult;
import com.alibaba.goods.order.service.impl.HanderExceptionMannager;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @Author:RenPu
 * @Date: 2020/7/7 13:07
 * @Version: 1.0
 * @description:
 */

@FeignClient(value = "goods-user-account")
public interface AccountService {

    /**
     * 扣减用户账户金额方法
     * @param userId
     * @param money
     * @return
     */
    @PostMapping(value = "/account/decrease")
    public Commentresult decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
